This Script will enable you to run Scripts that are in the Editor,
in the Console-Window. It must be installed like a normal Blender-AddOn and also be enabled in Preferences.

For Details (&Author) see here:
https://blenderartists.org/t/run-script-in-pyconsole-menu/588448/10
and here:
https://gist.github.com/tin2tin/a48ab242db6f6d9ce6fa36c85464bc1d

